package org.toonan.rental.chart;

import android.content.Context;
import android.graphics.Canvas;
import android.graphics.Paint;
import android.view.View;

public class ThreadView extends View
{
	private static float HEIGHT = 350.0F;
	private float preValue = 5.0F;
	private float rate = 3.4F;
	private float value = 10.0F;
	
	public ThreadView(Context paramContext, float paramFloat1, float paramFloat2)
	{
		super(paramContext);
		this.value = paramFloat1;
		this.preValue = paramFloat2;
	}
	
	private void drawLine(Canvas paramCanvas)
	{
		Paint localPaint = new Paint();
		localPaint.setColor(-16776961);
		localPaint.setShadowLayer(3.0F, 5.0F, -5.0F, -16777216);
		localPaint.setStrokeWidth(2.0F);
		localPaint.setAntiAlias(true);
		paramCanvas.drawLine(5.0F, HEIGHT - this.preValue * this.rate, 85.0F,
				HEIGHT - this.value * this.rate, localPaint);
	}
	
	protected void onDraw(Canvas paramCanvas)
	{
		super.onDraw(paramCanvas);
		drawLine(paramCanvas);
	}
}